<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript"
	src="${pageContext.request.contextPath}/scripts/jquery-1.7.1.js"></script>
</head>
<style>
body {
	margin: 0;
	font-size: 12px;
}

.order-table  td {
	text-align: center;
	overflow: hidden;
	padding: 5px 0;
	height: 70px;
}

.order-table th {
	border-left: 2px solid white;
	text-align: center;
	height: 24px;
	line-height: 24px;
}

.order-table th hr {
	height: 3px;
	background-color: #B2D1FF;
	color: #B2D1FF;
}

.blue-line {
	background:
		url(${pageContext.request.contextPath}/pages/css/web/T1Ll1iXfNXXXXXXXXX-950-1.png)
		no-repeat 0 bottom;
}
</style>

<body>
	<h1 style="text-align: left; color: #FF6600">
		<font style="color: gray">购物车详情&nbsp;&nbsp;&nbsp;>></font>&nbsp;&nbsp;&nbsp;确认订单&nbsp;&nbsp;&nbsp;<font
			style="color: gray">>>&nbsp;&nbsp;&nbsp;生成订单</font>
	</h1>
	<s:form action="customer!order" namespace="/web" id="orderForm">
		<s:hidden name="order.cost" value="%{cost}"></s:hidden>
		<div>
			<h3>确认订单信息</h3>
			<table cellspadding="0" cellspacing="0" style="width: 900px"
				class="order-table">
				<thead>
					<tr>
						<th>序号
							<hr>
						</th>
						<th>产品
							<hr>
						</th>
						<th>图片
							<hr>
						</th>
						<th>单价
							<hr>
						</th>
						<th>数量
							<hr>
						</th>
						<th>小计
							<hr>
						</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="orderProducts" status="rowstatus">
						<tr>
							<td><s:property value="#rowstatus.index+1" /></td>
							<td><s:property value="product.name" /></td>
							<td><img
								src="${pageContext.request.contextPath}/<s:property value="product.productFile.urlPath"/>"
								width="129px" height="44px" />
							</td>
							<td><s:property value="product.price" />
							</td>
							<td><s:property value="piece" />
							</td>
							<td class="s-amount"><s:property value="product.price*piece" />
							</td>

						</tr>
					</s:iterator>
					<tr>
						<td colspan="6" style="text-align: right">总金额：<span
							id="totalCost"><s:property value="cost" /> </span>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
		<div>
			<table>
				<tr>
					<td>输入地址:</td>
					<td><s:textarea theme="simple" name="order.area"
							style="width:800px"></s:textarea></td>
				</tr>
			</table>
			<div style="text-align: right">
				<span style="padding-right: 50px"> <s:a action="customer"
						namespace="/web" method="shopCartDetail">返回购物车</s:a> <a href="#"
					onclick="createOrder()">提交订单</a> </span>
			</div>
		</div>
	</s:form>

	<script type="text/javascript">
	function createOrder(){
		$("#orderForm").submit();
	}
</script>

</body>
</html>